{include file="header.html"}

<div class="page-header">
	<h6>
		订单管理
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			订单列表
		</small>
		<!--<div>
			<a href="javascript:void(0)" mark="export" class="dialog" skip="check">导出订单</a>
		</div>-->
	</h6>
</div>

<form class="form-inline" action="?" method="get">
<input type="hidden" name="app" id="app" value="order" />
<input type="hidden" name="act" id="act" value="index" />
<input type="hidden" name="integral_order" id="integral_order" value="{$integral_order}" /> 
<input type="text" class="input-medium" placeholder="关键词，会员名称/电话/单号等" name="keyword" value="{$keyword}" style="width:250px;" /> 
<input type="text" class="input-medium" placeholder="城市名称" name="city" value="{$city}" style="width:100px;" /> 
<select name="pay_method" id="pay_method" class="form-control">
<option value=""> 支付方式 </option>
<!--<option value="wxpay" {if $pay_method=="wxpay"}selected{/if}>APP内微信支付</option>-->
<option value="wxpay_h5" {if $pay_method=="wxpay_h5"}selected{/if}>服务号内支付</option>
<!--<option value="alipay" {if $pay_method=="alipay"}selected{/if}>支付宝支付</option>-->
</select>
<select name="status" id="status" class="form-control">
<option value=""> 状态 </option>
<option value="0" {if $status=="0"}selected{/if}>未支付</option>
<option value="1" {if $status==1}selected{/if}>已支付</option>
<option value="2" {if $status==2}selected{/if}>已完成</option>
<option value="-1" {if $status==-1}selected{/if}>已取消</option>
</select>
<select name="differ_status" id="differ_status" class="form-control">
<option value=""> 差价支付状态 </option>
<option value="0" {if $differ_status=="0"}selected{/if}>未支付</option>
<option value="1" {if $differ_status==1}selected{/if}>已支付</option>
</select>
<button type="submit" class="btn btn-info btn-sm">
	<i class="ace-icon fa fa-search bigger-110"></i>搜索
</button>
</form>

<div class="table-content">
<table id="simple-table" class="table table-striped table-bordered table-hover">
	<thead>
		<tr>
			<th>ID</th>
			<th>订单单号</th>
			<th>下单人</th>
			<th>参保姓名</th>
			<th>身份证号码</th>
			<th>城市</th>
			<th>电话</th>
			<th>{if $integral_order==1}总积分{else}总价/元{/if}</th>
			<th>支付方式</th>
			<th>状态</th>
			<th>差价支付状态</th>
			<th>备注</th>
			<th>下单时间</th>
			<th>操作</th>
		</tr>
	</thead>

	<tbody>
		{foreach from=$rs item=row name=row}
		<tr>
			<td>{$row.id}</td>
			<td><a href="?app=order&act=edit&id={$row.id}">{$row.order_sn}</a></td>
			<td><a href="?app=member&act=edit&id={$row.member_id}">{$row.member_name}</a></td>
			<td>{$row.canbao_name}</td>
			<td>{$row.canbao_idcard}</td>
			<td>{$row.city_name}</td>
			<td>{$row.mobile}</td>
			<td>{if $integral_order==1}{intval($row.total_price)}{else}{$row.total_price}{/if}</td>
			<td align="center">
				{if $row.pay_method == 'wxpay'}APP内微信支付 
				{else if $row.pay_method == 'wxpay_h5'}服务号内支付 
				{else if $row.pay_method == 'alipay'}支付宝支付
				{else if $row.pay_method == 'integral'}积分兑换{/if}</td>
			<td align="center">
				{if $row.status == 0}未支付
				{else if $row.status == 1}已支付
				{else if $row.status == 2}已完成
				{else if $row.status == -1}取消{/if}</td>
			<td>
				{if $row.differ_pay_time>0}<font color="orange">已支付</font>
				{else if $row.differ_money>0}<font color="red">未支付</font>
				{else}-{/if}
			</td>
			<td>{$row.remark}</td>
			<td>{$row.add_time}</td>
			<td>
				<a href="?app=order&act=edit&id={$row.id}">
					<button type="button" class="btn btn-xs btn-info">
					<i class="ace-icon fa fa-pencil bigger-120"></i>
				</button>
				</a>
			</td>
		</tr>
		{foreachelse}
		<tr bgcolor="white"><td colspan="13" height="50">暂无记录</td></tr>
		{/foreach}	
		
	</tbody>
</table>
</div>
<div class="mypage"> 
	共 {$page.num_records} 个记录  {$page.current_page} / {$page.num_pages} 页  {$page.first_page} {$page.prev} {$page.nav} {$page.next} {$page.last_page}
</div>

{include file="footer.html"}
<script>
$(function(){
	$('#begin_date').datepicker();
	$('#end_date').datepicker();
	$('.selectpicker').selectpicker({
		'selectedTexselectpickert': 'cat'
	});
});
</script>

